package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.enumclass.WechatMessageCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by marco on 2017/5/25.
 * 微信公众号关键字回复类
 */
@Entity
@Table(name = "message_reply_rule")
@DynamicInsert
@DynamicUpdate
public class MessageReplyRule extends IDEntityMall {

    @Column(columnDefinition = "varchar(100) comment '规则名称'")
    private String name;
    @Column(columnDefinition = "bigint(20) comment '平台ID'")
    private Long mallId;
    @Column(columnDefinition = "varchar (20) default 'NO' comment '是否全部回复 (是:YES,否:NO)'")
    @Enumerated(EnumType.STRING)
    protected Whether allReply = Whether.NO;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Whether getAllReply() {
        return allReply;
    }

    public void setAllReply(Whether allReply) {
        this.allReply = allReply;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    @Override
    public String toString() {
        return "MessageReplyRule{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", mallId=" + mallId +
                ", allReply=" + allReply +
                '}';
    }
}
